package org.rkuk.kasutil.uintTest.framework 
{
	/**
	 * ...
	 * @author rkuk
	 */
	public class TestResult 
	{
		private var classToTest_:Class;
		private var methodName_:String;
		
		private var failure_:Array;
		private var error_:Array;
		private var warning_:Array;
		
		private var stepTime_:Array;
		private var stepName_:Array;
		private var totalTime_:int;
		
		public function TestResult(classToTest:Class,methodName:String) 
		{
			classToTest_ = classToTest;
			methodName_ = methodName;
			totalTime = 0;
		}
		
		
		public function addFailure(failure:Error):void
		{
			if (failure_ == null)
				failure_ = new Array();
				
			failure_.push(failure);
		}
		
		public function addError(error:Error):void
		{
			if (error_ == null)
				error_ = new Array();
				
			error_.push(error);
		}
		
		public function addWarning(warning:Error):void
		{
			if (warning_ == null)
				warning_ = new Array();
				
			warning_.push(warning);
		}
		
		public function set totalTime(value:int):void
		{
			totalTime_ = value;
		}
		
		public function get totalTime():int 
		{
			return totalTime_;
		}
		
		public function addStepTime(methodName:String, time:int):void
		{
			if (stepTime_ == null)
			{
				stepTime_ = new Array();
				stepName_ = new Array();
			}
			stepName_.push(methodName);
			stepTime_.push(time);
		}
	}
}